package com.tj.collection.db.dao.impl;

import com.fqgj.common.api.Page;
import com.fqgj.common.base.AbstractBaseMapper;
import com.tj.collection.db.dao.AiNoOverdueOutboundDao;
import com.tj.collection.db.entity.AiNoOverdueOutboundEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: anonymous
 * Date: 2020-09-24
 * Time: 15:14:49.184
 */

@Repository
public class AiNoOverdueOutboundDaoImpl extends AbstractBaseMapper<AiNoOverdueOutboundEntity> implements AiNoOverdueOutboundDao {

    @Override
    public List<AiNoOverdueOutboundEntity> getEntity(Page page) {
        Map<String, Object> param = new HashMap<String, Object>() {{
            put("page", page);
        }};
        return this.getSqlSession().selectList(this.getStatement("getEntity"), param);
    }

    @Override
    public void updateStatus(String mobile, Integer status) {
        Map<String, Object> param = new HashMap<String, Object>() {{
            put("mobile", mobile);
            put("status", status);

        }};
        this.getSqlSession().update(this.getStatement("updateStatus"), param);
    }
}